function multipleAll(
    values: number[] | undefined,
    factor: number
) {
    if (!values) {
        return values;
    } else {
        return values.map(x => x * factor);
    }
}